/**
 * 默认权限树数据
 * 用于初始化权限树编辑器
 */

export const RESOURCE_TREE = [
  {
    name: "仪表盘",
    code: "dashboard",
    type: "MENU",
    path: "dashboard",
    component: "/dashboard/index.vue",
    children: [
      {
        name: "查看",
        code: "dashboard:view",
        type: "BUTTON",
        children: [
          {
            name: "统计数据接口",
            code: "dashboard:view:stats",
            type: "API",
            path: "/api/system/ae/dashboard/stats",
            method: "GET",
          },
        ],
      },
    ],
  },
  {
    name: "基础权限管理",
    code: "system",
    type: "DIRECTORY",
    children: [
      {
        name: "应用管理",
        code: "system:application",
        type: "MENU",
        path: "application",
        component: "/basic/application/index.vue",
        children: [
          {
            name: "查询",
            code: "system:application:query",
            type: "BUTTON",
            children: [
              {
                name: "分页接口",
                code: "system:application:query:page",
                type: "API",
                path: "/api/system/ae/applications",
                method: "GET",
              },
            ],
          },
          {
            name: "添加应用",
            code: "system:application:create",
            type: "BUTTON",
            children: [
              {
                name: "添加接口",
                code: "system:application:create:api",
                type: "API",
                path: "/api/system/ae/applications",
                method: "POST",
              },
            ],
          },
          {
            name: "编辑应用",
            code: "system:application:update",
            type: "BUTTON",
            children: [
              {
                name: "编辑接口",
                code: "system:application:update:api",
                type: "API",
                path: "/api/system/ae/applications/{id}",
                method: "PUT",
              },
            ],
          },
          {
            name: "启用",
            code: "system:application:enable",
            type: "BUTTON",
            children: [
              {
                name: "启用接口",
                code: "system:application:enable:api",
                type: "API",
                path: "/api/system/ae/applications/{id}/enable",
                method: "POST",
              },
            ],
          },
          {
            name: "禁用",
            code: "system:application:disable",
            type: "BUTTON",
            children: [
              {
                name: "禁用接口",
                code: "system:application:disable:api",
                type: "API",
                path: "/api/system/ae/applications/{id}/disable",
                method: "POST",
              },
            ],
          },
          {
            name: "删除",
            code: "system:application:delete",
            type: "BUTTON",
            children: [
              {
                name: "删除接口",
                code: "system:application:delete:api",
                type: "API",
                path: "/api/system/ae/applications/{id}",
                method: "DELETE",
              },
            ],
          },
        ],
      },
      {
        name: "员工管理",
        code: "system:employee",
        type: "MENU",
        path: "employee",
        component: "/basic/employee/index.vue",
        children: [
          {
            name: "查询",
            code: "system:employee:query",
            type: "BUTTON",
            children: [
              {
                name: "分页接口",
                code: "system:employee:query:page",
                type: "API",
                path: "/api/system/ae/employees",
                method: "GET",
              },
            ],
          },
          {
            name: "添加员工",
            code: "system:employee:create",
            type: "BUTTON",
            children: [
              {
                name: "添加接口",
                code: "system:employee:create:api",
                type: "API",
                path: "/api/system/ae/employees",
                method: "POST",
              },
            ],
          },
          {
            name: "编辑员工",
            code: "system:employee:update",
            type: "BUTTON",
            children: [
              {
                name: "编辑接口",
                code: "system:employee:update:api",
                type: "API",
                path: "/api/system/ae/employees/{id}",
                method: "PUT",
              },
            ],
          },
          {
            name: "启用",
            code: "system:employee:enable",
            type: "BUTTON",
            children: [
              {
                name: "启用接口",
                code: "system:employee:enable:api",
                type: "API",
                path: "/api/system/ae/employees/{id}/enable",
                method: "POST",
              },
            ],
          },
          {
            name: "禁用",
            code: "system:employee:disable",
            type: "BUTTON",
            children: [
              {
                name: "禁用接口",
                code: "system:employee:disable:api",
                type: "API",
                path: "/api/system/ae/employees/{id}/disable",
                method: "POST",
              },
            ],
          },
          {
            name: "删除",
            code: "system:employee:delete",
            type: "BUTTON",
            children: [
              {
                name: "删除接口",
                code: "system:employee:delete:api",
                type: "API",
                path: "/api/system/ae/employees/{id}",
                method: "DELETE",
              },
            ],
          },
        ],
      },
      {
        name: "角色管理",
        code: "system:role",
        type: "MENU",
        path: "role",
        component: "/basic/role/index.vue",
        children: [
          {
            name: "查询",
            code: "system:role:query",
            type: "BUTTON",
            children: [
              {
                name: "分页接口",
                code: "system:role:query:page",
                type: "API",
                path: "/api/system/ae/roles",
                method: "GET",
              },
            ],
          },
          {
            name: "添加角色",
            code: "system:role:create",
            type: "BUTTON",
            children: [
              {
                name: "添加接口",
                code: "system:role:create:api",
                type: "API",
                path: "/api/system/ae/roles",
                method: "POST",
              },
            ],
          },
          {
            name: "编辑角色",
            code: "system:role:update",
            type: "BUTTON",
            children: [
              {
                name: "编辑接口",
                code: "system:role:update:api",
                type: "API",
                path: "/api/system/ae/roles/{id}",
                method: "PUT",
              },
            ],
          },
          {
            name: "启用",
            code: "system:role:enable",
            type: "BUTTON",
            children: [
              {
                name: "启用接口",
                code: "system:role:enable:api",
                type: "API",
                path: "/api/system/ae/roles/{id}/enable",
                method: "POST",
              },
            ],
          },
          {
            name: "禁用",
            code: "system:role:disable",
            type: "BUTTON",
            children: [
              {
                name: "禁用接口",
                code: "system:role:disable:api",
                type: "API",
                path: "/api/system/ae/roles/{id}/disable",
                method: "POST",
              },
            ],
          },
          {
            name: "删除",
            code: "system:role:delete",
            type: "BUTTON",
            children: [
              {
                name: "删除接口",
                code: "system:role:delete:api",
                type: "API",
                path: "/api/system/ae/roles/{id}",
                method: "DELETE",
              },
            ],
          },
          {
            name: "权限管理",
            code: "system:role:permission",
            type: "BUTTON",
            children: [
              {
                name: "获取角色权限接口",
                code: "system:role:permission:get",
                type: "API",
                path: "/api/system/ae/role-resources/codes/{roleId}",
                method: "GET",
              },
              {
                name: "分配权限接口",
                code: "system:role:permission:assign",
                type: "API",
                path: "/api/system/ae/role-resources/assign",
                method: "POST",
              },
            ],
          },
        ],
      },
      {
        name: "员工角色关系",
        code: "system:employee_role",
        type: "MENU",
        path: "employee-role",
        component: "/basic/employee-role/index.vue",
        children: [
          {
            name: "查询",
            code: "system:employee_role:query",
            type: "BUTTON",
            children: [
              {
                name: "分页接口",
                code: "system:employee_role:query:page",
                type: "API",
                path: "/api/system/ae/employee-roles",
                method: "GET",
              },
            ],
          },
          {
            name: "添加关系",
            code: "system:employee_role:create",
            type: "BUTTON",
            children: [
              {
                name: "添加接口",
                code: "system:employee_role:create:api",
                type: "API",
                path: "/api/system/ae/employee-roles",
                method: "POST",
              },
            ],
          },
          {
            name: "批量分配",
            code: "system:employee_role:batch_assign",
            type: "BUTTON",
            children: [
              {
                name: "批量分配接口",
                code: "system:employee_role:batch_assign:api",
                type: "API",
                path: "/api/system/ae/employee-roles/assign",
                method: "POST",
              },
            ],
          },
          {
            name: "删除关系",
            code: "system:employee_role:delete",
            type: "BUTTON",
            children: [
              {
                name: "删除接口",
                code: "system:employee_role:delete:api",
                type: "API",
                path: "/api/system/ae/employee-roles/{id}",
                method: "DELETE",
              },
            ],
          },
        ],
      },
      {
        name: "角色权限管理",
        code: "system:role_resource",
        type: "MENU",
        path: "role-resource",
        component: "/basic/role-resource/index.vue",
        children: [
          {
            name: "查询",
            code: "system:role_resource:query",
            type: "BUTTON",
            children: [
              {
                name: "分页接口",
                code: "system:role_resource:query:page",
                type: "API",
                path: "/api/system/ae/role-resources",
                method: "GET",
              },
              {
                name: "角色权限树接口",
                code: "system:role_resource:query:tree",
                type: "API",
                path: "/api/system/ae/role-resources/tree/{roleId}",
                method: "GET",
              },
              {
                name: "角色权限编码接口",
                code: "system:role_resource:query:codes",
                type: "API",
                path: "/api/system/ae/role-resources/codes/{roleId}",
                method: "GET",
              },
            ],
          },
          {
            name: "分配权限",
            code: "system:role_resource:assign",
            type: "BUTTON",
            children: [
              {
                name: "分配接口",
                code: "system:role_resource:assign:api",
                type: "API",
                path: "/api/system/ae/role-resources/assign",
                method: "POST",
              },
            ],
          },
          {
            name: "添加权限",
            code: "system:role_resource:create",
            type: "BUTTON",
            children: [
              {
                name: "添加接口",
                code: "system:role_resource:create:api",
                type: "API",
                path: "/api/system/ae/role-resources",
                method: "POST",
              },
            ],
          },
          {
            name: "移除权限",
            code: "system:role_resource:delete",
            type: "BUTTON",
            children: [
              {
                name: "删除接口",
                code: "system:role_resource:delete:api",
                type: "API",
                path: "/api/system/ae/role-resources/{id}",
                method: "DELETE",
              },
              {
                name: "批量删除接口",
                code: "system:role_resource:delete:batch",
                type: "API",
                path: "/api/system/ae/role-resources/batch",
                method: "DELETE",
              },
              {
                name: "移除权限接口",
                code: "system:role_resource:delete:remove",
                type: "API",
                path: "/api/system/ae/role-resources/remove/{roleId}",
                method: "DELETE",
              },
            ],
          },
          {
            name: "复制权限",
            code: "system:role_resource:copy",
            type: "BUTTON",
            children: [
              {
                name: "复制接口",
                code: "system:role_resource:copy:api",
                type: "API",
                path: "/api/system/ae/role-resources/copy",
                method: "POST",
              },
            ],
          },
        ],
      },
      {
        name: "资源管理",
        code: "system:resource",
        type: "MENU",
        path: "resource",
        component: "/basic/resource/index.vue",
        children: [
          {
            name: "查询",
            code: "system:resource:query",
            type: "BUTTON",
            children: [
              {
                name: "资源树接口",
                code: "system:resource:query:tree",
                type: "API",
                path: "/api/system/ae/resources/tree",
                method: "GET",
              },
            ],
          },
          {
            name: "添加资源",
            code: "system:resource:create",
            type: "BUTTON",
            children: [
              {
                name: "添加接口",
                code: "system:resource:create:api",
                type: "API",
                path: "/api/system/ae/resources",
                method: "POST",
              },
            ],
          },
          {
            name: "编辑资源",
            code: "system:resource:update",
            type: "BUTTON",
            children: [
              {
                name: "编辑接口",
                code: "system:resource:update:api",
                type: "API",
                path: "/api/system/ae/resources/{id}",
                method: "PUT",
              },
            ],
          },
          {
            name: "启用",
            code: "system:resource:enable",
            type: "BUTTON",
            children: [
              {
                name: "启用接口",
                code: "system:resource:enable:api",
                type: "API",
                path: "/api/system/ae/resources/{id}/enable",
                method: "POST",
              },
            ],
          },
          {
            name: "禁用",
            code: "system:resource:disable",
            type: "BUTTON",
            children: [
              {
                name: "禁用接口",
                code: "system:resource:disable:api",
                type: "API",
                path: "/api/system/ae/resources/{id}/disable",
                method: "POST",
              },
            ],
          },
          {
            name: "删除",
            code: "system:resource:delete",
            type: "BUTTON",
            children: [
              {
                name: "删除接口",
                code: "system:resource:delete:api",
                type: "API",
                path: "/api/system/ae/resources/{id}",
                method: "DELETE",
              },
            ],
          },
          {
            name: "上传全部",
            code: "system:resource:upload_all",
            type: "BUTTON",
            children: [
              {
                name: "上传接口",
                code: "system:resource:upload_all:api",
                type: "API",
                path: "/api/system/ae/resources/upload-all",
                method: "POST",
              },
            ],
          },
        ],
      },
    ],
  },
];
